﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
using System.Configuration;
using System.Web;
using System.IO;

namespace Core.DS
{
    public static partial class CourseDesign
    {
        public static dynamic submitCdPoint(int point, string username)
        {
            var sql = new Sql.SqlDataContext();
            var cd = sql.CourseDesign.FirstOrDefault(row => row.username == username);
            if (cd == null)
            {
                return new
                {
                    success = false,
                    msg = "找不到该学生"
                };
            }
            cd.point = point;
            sql.SubmitChanges();
            return new
            {
                success = true
            };
        }
    }
}
